﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace SyndicateDAO.Classes
{
    public class Diagnostic
    {
        public static void WriteToEventLog(Exception ex, string Info)
        {
            string sSource;
            string sLog;
            string sEvent;

            sSource = "BigLotterySyndicate";
            sLog = "Application";
            sEvent = Info;
            try
            {
                if (!EventLog.SourceExists(sSource))
                    EventLog.CreateEventSource(sSource, sLog);

                EventLog.WriteEntry(sSource, sEvent);
                EventLog.WriteEntry(sSource, sEvent, EventLogEntryType.Warning, 234);
            }
            catch
            {

            }
        }

    }
}
